package encryption

import (
	"crypto/sha256"
	"encoding/hex"
)


func EncryptionSha256(uname,secret,nowtime string)(string){
	hasher := sha256.New()
	hasher.Write([]byte(uname))
	hasher.Write([]byte(secret))
	hasher.Write([]byte(nowtime))
	byteDt := hasher.Sum(nil)
	return hex.EncodeToString(byteDt)
}

func EncryNoTimeSha256(uname,secret string)(string){
	hasher := sha256.New()
	hasher.Write([]byte(uname))
	hasher.Write([]byte(secret))
	byteDt := hasher.Sum(nil)
	return hex.EncodeToString(byteDt)
}